package cn.jiyun.controller;


import cn.jiyun.common.config.Result;
import cn.jiyun.entity.XmBusiness;
import cn.jiyun.service.IXmBusinessService;
import cn.jiyun.service.impl.XmBusinessServiceImpl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2024-11-25
 */
@RestController
@RequestMapping("/xm-client/xm-business")
public class XmBusinessController {

    @Autowired
    private IXmBusinessService xmBusinessService;


//    查询所有
    @RequestMapping("findAll")
    public Result findAll(Integer current, Integer pageSize,@RequestBody XmBusiness xmBusiness){
        Page<XmBusiness> xmBusinessPage=xmBusinessService.findAll(current,pageSize,xmBusiness);
        return Result.ok(xmBusinessPage);
    }


//    修改商户锁定原因
    @RequestMapping("updateBusiness")
    public Result updateBusiness(@RequestBody XmBusiness xmBusiness){
        xmBusinessService.updateById(xmBusiness);
        return Result.ok();
    }
}
